package com.yjf.ljr.util;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.GridView;

import com.yjf.ljr.R;

public class ShareCustomerDialog extends Dialog implements View.OnClickListener {

	private GridView shareGrid;
	private Button cancel;
	private FrameLayout shareContainer;

	public ShareCustomerDialog(Context context) {
		super(context, R.style.shareDialogTheme);
		initView();
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// 这句话起全屏的作用
		getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);

	}

	public ShareCustomerDialog(Context context, int theme) {
		super(context, theme);

	}

	private void initView() {
		setContentView(R.layout.activity_share);
		shareGrid = (GridView) findViewById(R.id.share_grid);
		cancel = (Button) findViewById(R.id.cancel);
		shareContainer = (FrameLayout) findViewById(R.id.share_container);
		cancel.setOnClickListener(this);
		shareContainer.setOnClickListener(this);
	}

	public GridView getGridView() {
		return shareGrid;
	}

	@Override
	public void onClick(View v) {
		dismiss();
	}

}
